package com.ai.service.made.impl;

import com.ai.entity.made.CoalRoutingInspection;
import com.ai.mapper.made.CoalRoutingInspectionMapper;
import com.ai.service.made.ICoalRoutingInspectionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiaok
 * @since 2024-10-28
 */
@Service
public class CoalRoutingInspectionServiceImpl extends ServiceImpl<CoalRoutingInspectionMapper, CoalRoutingInspection> implements ICoalRoutingInspectionService {

    @Override
    public List<CoalRoutingInspection> getRoutingInspectionListRelationId(Integer cameraFunctionId) {


        List<CoalRoutingInspection> routingInspectionList = this.list(new QueryWrapper<CoalRoutingInspection>()
                .select("start_time","end_time","detection_num","sequence")
                .eq("camera_function_id", cameraFunctionId));
        return routingInspectionList;
    }

    @Override
    public String getRoutingEndTimeStr(String cameraId, String functionType, String sequence) {

        //获取该摄像头该功能的配置关系id

        return baseMapper.getRoutingEndTimeStr(cameraId,sequence);
    }
}
